package org.webframe.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.webframe.dao.SysPermissionDao;
import org.webframe.entity.SysPermission;
import org.webframe.enums.LogicDeleteEnum;

@Service
public class SysPermissionService {
	
	@Autowired
	private SysPermissionDao sysPermissionDao;

	public List<SysPermission> findByLoginname(String loginname) {
		return sysPermissionDao.findByLoginname(loginname);
	}
	
	public List<SysPermission> findByExample(SysPermission example){
		example.setLogicDelete(LogicDeleteEnum.N.toString());
		return sysPermissionDao.template(example);
	}	

}
